package com.ylr.base.common.constant;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2021-12-09 11:44:00
 * className: RegexConstant 正则表达式常量类
 * version: 1.0
 * description:
 */
public class RegexConstant {

    /**
     * 手机号正则表达式
     */
    public static final String PHONE_REGEX = "^1(3[0-9]|4[0-1,4-9]|5[0-3,5-9]|6[2,5-7]|7[0-8]|8[0-9]|9[0-3,5-9])\\d{8}$";

    /**
     * 邮箱号正则表达式
     */
    public static final String EMAIL_REGEX = "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z\\d]{2,4}$";

    /**
     * ipv4地址正则表达式
     */
    public static final String IPv4_REGEX = "^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d).){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)$";

    /**
     * 用户密码正则表达式
     * 校验规则：用户密码只能由大小写字母、数字、特殊字符组成
     */
    public static final String PWD_REGEX = "[a-zA-Z0-9`~!@#$%^&*()+=|{}':;,\\[\\].<>/?！￥…（）—【】‘；：”“’。，、？·\\\\]{5,20}";

}
